package com.neuedu.springmvc.controller;

import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * 项目：springmvc-java4
 * 创建时间：  2022-03-22   15:07
 * 作者 :jshand
 * 描述 :
 */
public class MenuController implements Servlet {
    @Override
    public void init(ServletConfig config) throws ServletException {

    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        System.out.println("后台Person执行");

        PageContext pageContext;
        HttpServletResponse response = (HttpServletResponse) res;
        PrintWriter out = response.getWriter();
        out.write("SimpleServletHandlerAdapter");
        out.flush();
        out.close();
    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {

    }
}
